---
id: 655a13aa8af2510de51f2e1c
title: الخطوة 10
challengeType: 20
dashedName: step-10
---

# --description--

The `insert` method will be called by the user. In addition to the `self` parameter, it will also need a `key` parameter. This parameter will be the key value to insert into the binary search tree.

Add `key` as the second parameter to the function definition.

# --hints--

The `insert` method should contain the `self` parameter.

```js
({ test: () => assert.match(code, /def\s+insert\s*\(\s*self\s*,/) });
```

The `insert` method should contain the `key` parameter.

```js
({ test: () => assert.match(code, /def\s+insert\s*\(\s*self\s*,\s*key\s*\)/) });
```

# --seed--

## --seed-contents--

```py
class TreeNode:
    def __init__(self, key):
        self.key = key
        self.left = None
        self.right = None

class BinarySearchTree:
    def __init__(self):
        self.root = None

--fcc-editable-region--
    def insert(self):
        pass
--fcc-editable-region--
```
